﻿// HSS.Data.ModelGenerator.ObjectDefinition.cs
// ----------------------------------------------------------------------------
// Licensed under the MIT license
// http://www.opensource.org/licenses/mit-license.html
// ----------------------------------------------------------------------------
// HighSpeed-Solutions, LLC
// Copyright (c) 2001-2010
// ----------------------------------------------------------------------------
// File:       ObjectDefinition.cs
// Author:     HSS\gbanta
// Created:    08/12/2010
// Modified:   12/04/2010
// ----------------------------------------------------------------------------
namespace HSS.Data.ModelGenerator
{
	#region Using Directives
	using System.Collections.ObjectModel;
	using System.Data.SqlClient;
	#endregion

	#region ObjectDefinition
	/// <summary>
	/// Defines the details of a database object.
	/// </summary>
	public class ObjectDefinition
	{
		#region Constructors
		/// <summary>
		/// Constructor
		/// </summary>
		public ObjectDefinition()
		{

		}
		#endregion

		#region Properties
		/// <summary>
		/// Gets or sets the Objects schema.
		/// </summary>
		public string Schema { get; set; }
		/// <summary>
		/// Gets or sets the name of the object.
		/// </summary>
		public string ObjectName { get; set; }
		/// <summary>
		/// Gets or sets the name of the class to be generated.
		/// </summary>
		public string ClassName { get; set; }
		/// <summary>
		/// Gets or sets the raw SQL that returns data. For a Table/View this typically is
		/// select * from objectname.
		/// </summary>
		public string SqlDefinition { get; set; }
		/// <summary>
		/// Gets or sets if this object represents a table or view; if false then object is a stored procedure.
		/// </summary>
		public bool IsTable { get; set; }
		/// <summary>
		/// Gets or sets the parameters that are required if the object is a Stored Procedure.
		/// </summary>
		public ReadOnlyCollection<SqlParameter> Parameters { get; set; }
		#endregion
	}
	#endregion
}